<?php
	$footarticlecat = [];
    $articlecat = $this->db->query("select id,cat_title from article_cat where parent_id = 1 order by sort desc,id desc");
    foreach ($articlecat as $key => $val) {
        $footarticlecat[$val['id']] = $val;
    }

	$footarticle = [ 2=> [],3=> [],4=> [],5=> [],6=> [] ];
    $article = $this->db->query("select id,title,cat_id from article where cat_id in (2,3,4,5,6) and status = 0 order by sort desc,id desc");
    foreach ($article as $val) {
       $footarticle[$val['cat_id']][] = $val;
    }
?>
<div class='footer'>
<div class='w1200'>
	<ul class='links'>
	<li>
		<h3><?=$footarticlecat['2']['cat_title']?></h3>
		<?php foreach($footarticle['2'] as $k => $v):?>
			<a href="/article/detail?id=<?=$v['id']?>"><?=$v['title']?></a>
		<?php endforeach;?>
	</li>

	<li>
		<h3><?=$footarticlecat['3']['cat_title']?></h3>
		<?php foreach($footarticle['3'] as $k => $v):?>
			<a href="/article/detail?id=<?=$v['id']?>"><?=$v['title']?></a>
		<?php endforeach;?>
	</li>

	<li>
		<h3><?=$footarticlecat['4']['cat_title']?></h3>
		<?php foreach($footarticle['4'] as $k => $v):?>
			<a href="/article/detail?id=<?=$v['id']?>"><?=$v['title']?></a>
		<?php endforeach;?>
	</li>

	<li>
		<h3><?=$footarticlecat['5']['cat_title']?></h3>
		<?php foreach($footarticle['5'] as $k => $v):?>
			<a href="/article/detail?id=<?=$v['id']?>"><?=$v['title']?></a>
		<?php endforeach;?>
	</li>

	<li>
		<h3><?=$footarticlecat['6']['cat_title']?></h3>
		<?php foreach($footarticle['6'] as $k => $v):?>
			<a href="/article/detail?id=<?=$v['id']?>"><?=$v['title']?></a>
		<?php endforeach;?>
	</li>
	</ul>
	<?php include_once 'bottom.html';?>
	<div class='authen'>
		<a href='javascript:;'><img src="<?=$com['img']['foot_1']['pic']?>"></a>
		<a href='javascript:;'><img src="<?=$com['img']['foot_2']['pic']?>"></a>
		<a href='javascript:;'><img src="<?=$com['img']['foot_3']['pic']?>"></a>
		<a href='javascript:;'><img src="<?=$com['img']['foot_4']['pic']?>"></a>
	</div>
</div>
</div>
</body>
<script type="text/javascript" src="/static/vendor/function.js?v=<?=env('version')?>"></script>
</html>
